home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "MaritalStatus"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = True
- Option Explicit
-
- ' the following pertain to being supported by
- ' VBOFCollection, VBOFObjectManager and
- ' VBOFEventManager
- Public ObjectID As Long
- Public ObjectChanged As Long
- Public ObjectAdded As Long
- Public ObjectDeleted As Long
- Public ObjectParentCount As Long
- Public ObjectManager As VBOFObjectManager
-
- Public MaritalStatusCode As String
- Public Description As String
- Public Function ObjectSortCompare(Optional SortField As Variant, Optional SortOrder As Variant, Optional CompareObject As Variant) As Long
- ' Support the Collection.Sort method
- ' Note: use the ObjectManager.ObjectSortCompare
- ' method for assistance
-
- Select Case SortField
- Case "GenderCode"
- ObjectSortCompare = _
- ObjectManager.ObjectSortCompare( _
- Value1:=MaritalStatusCode, _
- Value2:=CompareObject.MaritalStatusCode, _
- SortOrder:=SortOrder)
-
- Case "CapitalCity"
- ObjectSortCompare = _
- ObjectManager.ObjectSortCompare( _
- Value1:=Description, _
- Value2:=CompareObject.Description, _
- SortOrder:=SortOrder)
- End Select
-
- End Function
-
-
-
- Public Function ObjectInitializeFromRecordSet(Optional RecordSet As Variant) As Address
- ' Populate my variables from the RecordSet
- ' (in support of VBOFCollection)
-
- On Local Error Resume Next
-
- MaritalStatusCode = RecordSet("MaritalStatusCode")
- Description = RecordSet("Description")
-
- ObjectID = RecordSet("ObjectID")
-
- Set ObjectInitializeFromRecordSet = Me
- End Function
-
- Public Function ObjectListBoxValue() As String
- ' Return a String will represent this object
- ' in a ListBox
- ' (in support of VBOFCollection)
-
- ObjectListBoxValue = _
- MaritalStatusCode & " (" & Description & ")"
-
- End Function
-
- Public Function ObjectNewInstanceOfMyClass() As MaritalStatus
- ' Return a new instance of this class
- ' (in support of VBOFCollection)
-
- Set ObjectNewInstanceOfMyClass = New MaritalStatus
- End Function
-
- Public Function ObjectDataSource() As String
- ' Return the Data Source with which this Class is associated
- ' (in support of VBOFCollection)
-
- ObjectDataSource = "MaritalStatusCodes"
- End Function
-
-
-
-